package com.example.kingdee.kingdeeBridge.kingdeeAbs;

import com.example.kingdee.kingdeeBridge.common.RequestResult;
import com.example.kingdee.kingdeeBridge.dto.BillWriteInDto;
import com.example.kingdee.kingdeeBridge.kingdeeImpl.BillImpl;
import com.kingdee.bos.webapi.entity.RepoRet;

import java.util.Map;

public abstract class KingdeeAbstract {

    protected BillImpl billImpl;

    public KingdeeAbstract(BillImpl billImpl) {
        this.billImpl = billImpl;
    }


    //查询目标单据行id和源单行id
    public Map<String, String> selectTargetBillEntry(String fid){
        return billImpl.selectTargetBillEntry(fid);
    }

    /**
     *
     * @param fid 表id
     * @param billWriteInDto 源单信息
     * @param targetInfo 目标单据行id和源单行id对应关系
     * @return
     */
    public RequestResult updateTargetBillEntry(String fid, BillWriteInDto billWriteInDto, Map<String, String> targetInfo){
        return billImpl.updateTargetBillEntry(fid, billWriteInDto, targetInfo);
    }

    //提交审核目标单据
    public void auditTargetBill(String billNo) {
        billImpl.auditTargetBill(billNo);
    }

    //删除目标单据
    public void deleteTargetBill(String fid){
        billImpl.deleteTargetBill(fid);
    }

    //后置操作
    public void postPosition(String billNo){
        billImpl.postPosition(billNo);
    }


}
